<%--
  Created by IntelliJ IDEA.
  User: dzw
  Date: 2018/3/30
  Time: 14:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
  String path = request.getContextPath();
  String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<ul class="list-group">
  <form class="form-horizontal" id="member_street_form">
    <input type="hidden" id="keyId" name="keyId" value="${keyId}" >
    <c:forEach items="${streetList}" var="street" varStatus="index">
      <li class="list-group-item">
        <input type="checkbox" id="street_${index.index}" class="magic-checkbox" name="streetId" value="${street.id}" <c:if test="${fn:indexOf(hasStreet, street.id)>=0}">checked</c:if>>
        <label for="street_${index.index}">${street.name}</label>
      </li>
    </c:forEach>
  </form>

</ul>

<script>
  function fn_member_streetView(){
    var url = "<%=path%>/main/member/saveMemberStreet";
    __form_save("member_street_form",url,function(pdata){
//      __toastr_success(pdata.message);
    })
  }
</script>